import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:home_box/pages/medicine/MedicineVM/medicine_add_vm.dart';

///适应症
class MedicineInfoIndication extends StatelessWidget {
  const MedicineInfoIndication({super.key});

  @override
  Widget build(BuildContext context) {
    final MedicineVM controller = Get.find<MedicineVM>(tag: 'MedicineVM');
    return Container(
      margin: EdgeInsets.only(top: 10),
      child: IntrinsicHeight(
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.start,
          mainAxisAlignment: MainAxisAlignment.start,
          children: [
            Text('适应症：', style: TextStyle(fontSize: 14)),
            Expanded(
              child: TextField(
                maxLines: null,
                controller: controller.indicationController,
                cursorColor: Colors.blue,
                style: TextStyle(fontSize: 14),
                decoration: InputDecoration(
                  border: InputBorder.none,
                  hintText: "请输入适应症",
                  hintStyle: TextStyle(fontSize: 14, color: Colors.grey),
                  contentPadding: EdgeInsets.all(0),
                  isDense: true,
                ),
                onChanged: (value) {
                  controller.updateIndication(value);
                },
              ),
            ),
          ],
        ),
      ),
    );
  }
}